xc: fix segfault in pv domain create if kernel is an invalid image
authorGianni Tedesco <gianni.tedesco@citrix.com>
Mon, 9 Aug 2010 16:43:18 +0000 (17:43 +0100)
committerGianni Tedesco <gianni.tedesco@citrix.com>
Mon, 9 Aug 2010 16:43:18 +0000 (17:43 +0100)
commit8493e199f833705eb480e91b2dd4d0328202e525
tree1c2a473bbecf517fa3d32a44bdbfbac1ea2c8579
parent6d7a71986d206dcfea48a936b02401097572bf8d
xc: fix segfault in pv domain create if kernel is an invalid image

If libelf calls elf_err() or elf_msg() before elf_set_log() has been
called then it could potentially read an uninitialised log handling
callback function pointer from struct elf_binary. Fix this in libxc by
zeroing the structure before calling elf_init().

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
tools/libxc/xc_hvm_build.c